package com.fastloan.common.excel;

/**
 * Created by gelon on 2017/10/18.
 */
public class Form {

    Integer startRow,
        endRow,
        startColumn,
        endColumn;
    Short bordenColor,
        backgroundColor,
        fontColor,
        fontSize;
    String text;
    boolean bold = false;


    public Form(Integer startRow, Integer startColumn, String text) {
        this.startRow = startRow;
        this.startColumn = startColumn;
        this.text = text;
    }


    public Form(Integer startRow, Integer endRow, Integer startColumn, Integer endColumn, String text) {
        this.startRow = startRow;
        this.endRow = endRow;
        this.startColumn = startColumn;
        this.endColumn = endColumn;
        this.text = text;
    }

    public Form(Integer startRow, Integer endRow, Integer startColumn, Integer endColumn, Short backgroundColor, Short fontColor, Short fontSize,
        String text) {
        this.startRow = startRow;
        this.endRow = endRow;
        this.startColumn = startColumn;
        this.endColumn = endColumn;
        this.backgroundColor = backgroundColor;
        this.fontColor = fontColor;
        this.fontSize = fontSize;
        this.text = text;
    }


    public Form(Integer startRow, Integer startColumn, Short bordenColor, String text) {
        this.startRow = startRow;
        this.startColumn = startColumn;
        this.bordenColor = bordenColor;
        this.text = text;
    }


    public void to(Sheet sheet) {
        sheet.push(this);
    }


    public Form setBold(boolean bold) {
        this.bold = bold;
        return this;
    }


    public Form setBackgroundColor(Short backgroundColor) {
        this.backgroundColor = backgroundColor;
        return this;
    }
}
